/*
package com.demo.listener.canal;

import com.alibaba.fastjson.JSON;
import com.alibaba.otter.canal.protocol*/
/**//*
.CanalEntry;
import com.alibaba.otter.canal.protocol.Message;
import com.demo.util.CanalUtil;
import com.xpand.starter.canal.annotation.CanalEventListener;
import com.xpand.starter.canal.annotation.ListenPoint;
import java.util.List;
import java.util.Map;

*/
/**
 * canal监听器
 *
 * *@ListenPoint 注解
 * *schema ="要监听的数据库"
 * *table = "要监听的表"
 *
 *//*

@CanalEventListener
public class AdListener {


  */
/*  @ListenPoint(schema = "test", table = {"user"})
    public void adUpdate(CanalEntry.EventType eventType, CanalEntry.RowData rowData) {

        System.err.println("数据发生变化");
        rowData.getBeforeColumnsList().forEach((c) -> System.out.println("更改前 数据: " + c.getName() + " :: " + c.getValue()));
        rowData.getAfterColumnsList().forEach((c) -> System.out.println("更改后数 据: " + c.getName() + " :: " + c.getValue()));
    }*//*


    //@ListenPoint(schema = "test", table = {"user"})
    @ListenPoint(schema = "test")
    public void adUpdateConvent(CanalEntry.EventType eventType, CanalEntry.RowData rowData ){
      */
/*
        System.out.println(String.format("================&gt; binlog[%s:%s] , name[%s,%s] , eventType : %s",
                entry.getHeader().getLogfileName(), entry.getHeader().getLogfileOffset(),
                entry.getHeader().getSchemaName(), entry.getHeader().getTableName(),
                eventType));
*//*

        Map<String, String> beforeMap = CanalUtil.convertToMap( rowData.getBeforeColumnsList() );
        //修改前数据
          System.out.println( "修改前数据"+JSON.toJSONString(beforeMap));
        //修改后数据
         Map<String, String> afterMap = CanalUtil.convertToMap( rowData.getAfterColumnsList());
        System.out.println( "修改后数据"+JSON.toJSONString(afterMap));
        String beforePosition = beforeMap.get( "position" );
        System.out.println( "修改前"+JSON.toJSONString(beforePosition));

        String afterMapPosition = afterMap.get( "position" );
        System.out.println( "修改后"+JSON.toJSONString(afterMapPosition));

    }
}
*/
